<?php

/**
 * @version     $Id: default_sliders.php 3 2010-10-08 17:49:35Z obalyuk87@gmail.com $
 * @package     AdminSafe
 * @subpackage  Components
 * @author      Oleksandr Balyuk <obalyuk@boolcast.com>
 * @copyright   Copyright (C) 2010 Oleksandr Balyuk (www.boolcast.com)
 * @license     http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL v2
 */
// No direct access
defined('_JEXEC') or die('Restricted access');

//
$data =array(30, 50, 25, 10, 75, 32, 54, 234, 234, 12,32);
$data2 = array_flip($data);
$min = min($data);
$max = max($data);

$lineChart = new gLineChart(300, 300);
$lineChart->addDataSet($data);
$lineChart->addDataSet($data2);

//
$lineChart->setLegend(array("first", "second"));
$lineChart->setColors(array("ff3344", "11ff11"));

//
$lineChart->setVisibleAxes(array('x', 'y'));

$lineChart->setDataRange(0,$max);
$lineChart->addAxisRange(0, 1, count($data), 1);
$lineChart->addAxisLabel(0, array('p1', 'p2', 'p3', 'p4', 'p5', 'p6', 'p7'));
$lineChart->addAxisRange(1, $min, $max);
//$lineChart->addLineFill(B, '76A4FB', 0, 0);


echo JHTML::image($lineChart->getUrl(), JText::_('Chart'));
?>